# Generate use-cases with LLMs

<YouTube id="hrehRP54YuA" />

Writing use cases for components can be time-consuming — especially when dealing with many components in different states and configurations. 
Large Language Models (LLMs) can help automate this process by generating use cases based on a component's properties and behavior.

## Prompt

You can find the recommended prompt in the [`prompt.md`](https://github.com/widgetbook/widgetbook/tree/main/docs/assets/guides/use-case-llm-generation/prompt.md) file.

<Info>
We'd love your feedback on this prompt!  
Feel free to [start a discussion](https://github.com/widgetbook/widgetbook/discussions) or [contribute improvements](/contribution/ways-to-contribute).
</Info>

## Recommendations

For best results, consider the following tips:

- Use a recent LLM optimized for code generation.
- Work in IDEs like [Cursor](https://www.cursor.so/) or [Void](https://voideditor.com), or use extensions like GitHub Copilot to enable agentic LLM workflows. These tools provide better context awareness and integration with your codebase.
- Focus on one component/file at a time to give the LLM a clear scope.
- Always review and test the generated code before using it.
